extends StateBase

##状态所属
@export var enemy: BaseEnemy

func enter() -> void:
	super.enter()
	enemy.animation_player.play("running")

func physics_process_update(delta: float) -> void:
	super.physics_process_update(delta)
	
	if enemy.is_on_wall():
		enemy.sideways_velocity = - enemy.sideways_velocity
	
	enemy.move(enemy.sideways_velocity, enemy.speed)
